package com.ruoyi.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.LeaderMapper;
import com.ruoyi.domain.Leader;
import com.ruoyi.service.ILeaderService;

/**
 * 领导班子Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-17
 */
@Service
public class LeaderServiceImpl  extends ServiceImpl<LeaderMapper,Leader> implements ILeaderService
{
    @Autowired
    private LeaderMapper leaderMapper;

    /**
     * 查询领导班子
     *
     * @param leaderId 领导班子主键
     * @return 领导班子
     */
    @Override
    public Leader selectLeaderByLeaderId(Long leaderId)
    {
        return leaderMapper.selectLeaderByLeaderId(leaderId);
    }

    /**
     * 查询领导班子列表
     *
     * @param leader 领导班子
     * @return 领导班子
     */
    @Override
    public List<Leader> selectLeaderList(Leader leader)
    {
        return leaderMapper.selectLeaderList(leader);
    }

    /**
     * 新增领导班子
     *
     * @param leader 领导班子
     * @return 结果
     */
    @Override
    public int insertLeader(Leader leader)
    {
        return leaderMapper.insertLeader(leader);
    }

    /**
     * 修改领导班子
     *
     * @param leader 领导班子
     * @return 结果
     */
    @Override
    public int updateLeader(Leader leader)
    {
        return leaderMapper.updateLeader(leader);
    }

    /**
     * 批量删除领导班子
     *
     * @param leaderIds 需要删除的领导班子主键
     * @return 结果
     */
    @Override
    public int deleteLeaderByLeaderIds(Long[] leaderIds)
    {
        return leaderMapper.deleteLeaderByLeaderIds(leaderIds);
    }

    /**
     * 删除领导班子信息
     *
     * @param leaderId 领导班子主键
     * @return 结果
     */
    @Override
    public int deleteLeaderByLeaderId(Long leaderId)
    {
        return leaderMapper.deleteLeaderByLeaderId(leaderId);
    }
}
